package com.elem.test;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
//@AllArgsConstructor
//@NoArgsConstructor
public class Account {
    @JsonIgnore
    private int id;
    private  String name;
    private double money;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date date;

//    public Account(String name, double money) {
//        this.name = name;
//        this.money = money;
//    }

//    private Account(int id, String name) {
//        this.id = id;
//        this.name = name;
//    }

    public void showInfo(String name, double money){
        System.out.println("Account name: " + name + ", money: " + money);
    }

    public int sum(int a, int b) {
        return a + b;
    }
}
